package cn.zhouyafeng.itchat4j.thread;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by ZhaoTao on 2017/12/18.
 * 用于群发的用户 Key值保存
 */

public class ThreadUsers {
    private static int maxNum = 10;//默认最大值为10
    private static int now = -1;
    private static List<String> list = new ArrayList<>();

    static {
        for (int i = 0; i < maxNum; i++) {
            list.add(String.valueOf(i));
        }
    }

    public static String getNextKey() {
        if (maxNum - now <= 1) {
            now=-1;
        }
        now++;
        return list.get(now);
    }

}
